package cn.passlink.www.ServerImpl;

import cn.passlink.www.Enity.HotTop;
import cn.passlink.www.Mapper.HotTopDao;
import cn.passlink.www.Server.HotTopServer;
import cn.passlink.www.Utils.JsonUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@Slf4j
public class HotTopServerImpl implements HotTopServer {

    @Autowired
    private HotTopDao hotTopDao;

    @Override
    public Map<String, Object> getAll() {
      List<HotTop> list= hotTopDao.findAll();
     return    JsonUtils.dataListJson(200,list,"获取成功",list.size());

    }
}
